package org.example.hospital_frontend.service.impl;

import org.example.hospital_frontend.domain.MedicalRecordTemplate;
import org.example.hospital_frontend.mapper.MedicalRecordTemplateMapper;
import org.example.hospital_frontend.service.MedicalRecordTemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MedicalRecordTemplateServiceImpl implements MedicalRecordTemplateService {
    
    @Autowired
    private MedicalRecordTemplateMapper templateMapper;
    
    @Override
    public List<MedicalRecordTemplate> list() {
        return templateMapper.selectAll();
    }
    
    @Override
    public MedicalRecordTemplate getById(Integer id) {
        return templateMapper.selectById(id);
    }
    
    @Override
    public void save(MedicalRecordTemplate template) {
        templateMapper.insert(template);
    }
    
    @Override
    public void update(MedicalRecordTemplate template) {
        templateMapper.update(template);
    }
    
    @Override
    public void removeById(Integer id) {
        templateMapper.deleteById(id);
    }
} 